import java.awt.Color;
import java.util.ArrayList;

public class Path {
	//arraylist of coordinates in the travel path
	private ArrayList<Leg> points = new ArrayList<Leg>();
	private Color color = Color.CYAN;
	
	public void setColor(Color c) { color = c; }
	public Color getColor() { return color; }
	
	public int length() {
		return points.size();
	}
	
	public ArrayList<Leg> getList() {
		return points;
	}
	
	public Object[] getArray() {
		return points.toArray();
	}
	
	//append a node to the end of the list using 2 double coordinates
    public void add(Leg node) {
    	points.add(node);
    }
    
    //remove the node at a specific position in the list
    public void remove(int index) {
    	points.remove(index);
    }
    
    //remove a specific node
    public void remove(Leg node) {
    	points.remove(points.indexOf(node));
    }

}
